package com.example.util;


import org.springframework.stereotype.Component;

import java.util.Random;

@Component
public class CodeUtil {
    public String[] add = {"00000","0000","000","00","0",""};
    public String generateCode(String email){
        Random random = new Random();
        int i = random.nextInt(1000000);
        String code = i +"";
        return add[code.length() - 1] + code;
    }
}
